"READ ME" file
Date: 12 August 2023

This PSRM Dataverse repository contains the replication materials (data, code, codebook, and other information) for "Roll-Call Voting Under Random Seating Assignment" by David Darmofal, Charles J. Finocchiaro, and Indridi H. Indridason.

Please cite the published article when using these files. If you have questions, please contact Charles Finocchiaro (finocchi@ou.edu).


FILES AND DESCRIPTION:

# Overview:
	README.txt - describes the contents and organization of the repository (this file)

	renv.lock - information regarding all dependencies required for successful replication is located in the renv.LOCK file. The lockfile contains the version of R and versions of all packages in a format that can be readily used by the R package `renv`. Additionally, individual packages can be manually loaded using the information provided there.

	Replication Code.R - this file contains all of the code to replicate the analyses in the paper and outputs results in the order they appear there. The file also includes code to save images with the same parameters as those in the paper, although these are commented out. The code is commented and organized into sections that will call the relevant data from the \data subfolder of the repository. User should set the working directory to indicate where these files are saved locally when replicating.

	Codebook.pdf - describes variables contained in the data files referenced below
	

# Data files (\data folder):
	0.0 rep_env.RData - primary dataset for replication; contains neighbor definition objects and voting data	

	0.1 malaskr.dta - data file containing list of bills and resolutions from Alþingi

	0.2 atkvskr_###.csv - data files (### references the session number of Alþingi) containing individual-level MP votes organized at the vote-member level

	0.3 member_bills.RData - dataset for replication of the supplemental analysis of member bills appearing in Appendix E

	0.4 Scaling136.RData - dataset for reproducing the representative vote scaling for the 136th session of Alþingi in Appendix A (Figure A1) of the paper

	0.5 votes_merged.dta - dataset containing session-bill-vote level data on member bills for supplemental analysis in Appendix E (reproducing summary statistics in Table E1)

	0.6 wide_member_bills_###.dta - data files (### references the session number of Alþingi) used to compute summary statistics of aggregate voting on member bills (as presented in last two columns of Table E1 in the appendix)


# Additional figure files formatted the same as in the paper (\misc_figs folder):
	Figure_E4.do - Stata .do file that creates the figure showing the distribution of nonunanimous votes appearing in the appendix (Figure E4); requires loading Stata

	figure2.csv - summary data on bills and motions at the session level

	figure3.csv - summary data on votes at the session level

	histogram_votes.tex - LaTeX code that creates the figures showing the distribution of bills and motions per session (Figure 2) and number of votes per session (Figure 3); requires loading Stata



SOFTWARE AND ANALYSIS NOTES:

The R code above (Replication Code.R) also contains commands to output tables of spatial estimates with the same rounding and ordering rules that appear in the paper, as well as line commands for points referenced in the narrative.

The representative vote scaling appearing in the appendix (Figure A1) uses both NOMINATE and Bayesian IRT methods. While the former replicates exactly, the latter will by nature vary from iteration to iteration, although the substantive results are the same. The R script contains that code as well.

Analyses were conducted on a Mac (4.2 Ghz 4-core processor, 32GB RAM) running Big Sur 11.6 using R version 4.2.3 (2023-03-15) and Stata/SE version 14.2 for Mac (Revision 29 Jan 2018).

Analyses require the following R packages (also called in Replication Code.R and referenced in renv.lock):

# sessionInfo()# R version 4.2.3 (2023-03-15)# Platform: x86_64-apple-darwin17.0 (64-bit)# Running under: macOS Big Sur 11.6# # Matrix products: default# LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib# # locale:# [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8# # attached base packages:# [1] stats     graphics  grDevices utils     datasets  methods   base     # # other attached packages:#  [1] rio_0.5.29       wnominate_1.4    pscl_1.5.5.1     ggh4x_0.2.4      gt_0.9.0         lubridate_1.9.2  forcats_1.0.0    stringr_1.5.0   #  [9] dplyr_1.1.1      purrr_1.0.1      readr_2.1.4      tidyr_1.3.0      tibble_3.2.1     ggplot2_3.4.2    tidyverse_2.0.0  spdep_1.2-8     # [17] spatialreg_1.2-8 sf_1.0-12        Matrix_1.5-3     spData_2.2.2    # # loaded via a namespace (and not attached):#  [1] Rcpp_1.0.10        lattice_0.20-45    deldir_1.0-6       class_7.3-21       digest_0.6.31      utf8_1.2.3         cellranger_1.1.0  #  [8] R6_2.5.1           coda_0.19-4        e1071_1.7-13       pillar_1.9.0       rlang_1.1.0        readxl_1.4.2       curl_5.0.0        # [15] data.table_1.14.8  rstudioapi_0.14    splines_4.2.3      foreign_0.8-84     munsell_0.5.0      proxy_0.4-27       compiler_4.2.3    # [22] pkgconfig_2.0.3    htmltools_0.5.5    tidyselect_1.2.0   expm_0.999-7       fansi_1.0.4        tzdb_0.3.0         withr_2.5.0       # [29] MASS_7.3-58.2      wk_0.7.2           grid_4.2.3         nlme_3.1-162       gtable_0.3.3       lifecycle_1.0.3    DBI_1.1.3         # [36] magrittr_2.0.3     units_0.8-1        scales_1.2.1       zip_2.3.0          KernSmooth_2.23-20 cli_3.6.1          stringi_1.7.12    # [43] LearnBayes_2.15.1  sp_1.6-0           xml2_1.3.3         generics_0.1.3     vctrs_0.6.1        openxlsx_4.2.5.2   boot_1.3-28.1     # [50] s2_1.1.2           tools_4.2.3        glue_1.6.2         hms_1.1.3          fastmap_1.1.1      timechange_0.2.0   colorspace_2.1-0  # [57] classInt_0.4-9     haven_2.5.2    
